package com.dragon.modules.yuegou.model.wallet;

import com.dragon.modules.yuegou.entity.wallet.InvoiceEntity;
import com.dragon.modules.yuegou.enums.wallet.InvoiceStatus;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 发票（商户向企业开的发票）模型类
 * 
 * @author pbuilder generated
 * @date 2019-08-14 21:18:54
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class Invoice extends InvoiceEntity {

	/** 纳税人识别号 */
	@ApiModelProperty("纳税人识别号")
	protected String taxpayerIdentificationNumber;

	@ApiModelProperty("企业地址")
	protected String contactAddress;

	public String getTaxpayerIdentificationNumber() {
		return taxpayerIdentificationNumber;
	}

	public void setTaxpayerIdentificationNumber(String taxpayerIdentificationNumber) {
		this.taxpayerIdentificationNumber = taxpayerIdentificationNumber;
	}

	public String getContactAddress() {
		return contactAddress;
	}

	public void setContactAddress(String contactAddress) {
		this.contactAddress = contactAddress;
	}

	/**
	 * 构造一个空发票（商户向企业开的发票）模型对象
	 */
	public Invoice(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个发票（商户向企业开的发票）模型对象
	 * 
	 * @param entity 实体对象
	 */
	public Invoice(InvoiceEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个发票（商户向企业开的发票）模型对象
	 * 
	 * @param other 其它对象
	 */
	public Invoice(Invoice other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置发票ID
	 * 
	 * @param id 发票ID
	 * @return 当前对象
	 */
    public Invoice id(String id) {
    	this.id = id;
    	return this;
    }
    
	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈ID
	 * 
	 * @param busdId 商圈ID
	 * @return 当前对象
	 */
    public Invoice busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public Invoice merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getMerchantName() {
    	return merchantName;
    }

    /**
	 * 设置商户名称
	 * 
	 * @param merchantName 商户名称
	 * @return 当前对象
	 */
    public Invoice merchantName(String merchantName) {
    	this.merchantName = merchantName;
    	return this;
    }

	@Override
	public String getCompanyId() {
    	return companyId;
    }

    /**
	 * 设置企业ID
	 * 
	 * @param companyId 企业ID
	 * @return 当前对象
	 */
    public Invoice companyId(String companyId) {
    	this.companyId = companyId;
    	return this;
    }

	@Override
	public String getCompanyName() {
    	return companyName;
    }

    /**
	 * 设置企业名称
	 * 
	 * @param companyName 企业名称
	 * @return 当前对象
	 */
    public Invoice companyName(String companyName) {
    	this.companyName = companyName;
    	return this;
    }

	@Override
	public LocalDate getStartDate() {
    	return startDate;
    }

    /**
	 * 设置发票开始日期（包含）
	 * 
	 * @param startDate 发票开始日期（包含）
	 * @return 当前对象
	 */
    public Invoice startDate(LocalDate startDate) {
    	this.startDate = startDate;
    	return this;
    }

	@Override
	public LocalDate getEndDate() {
    	return endDate;
    }

    /**
	 * 设置发票截止日期（包含）
	 * 
	 * @param endDate 发票截止日期（包含）
	 * @return 当前对象
	 */
    public Invoice endDate(LocalDate endDate) {
    	this.endDate = endDate;
    	return this;
    }

	@Override
	public BigDecimal getAmount() {
    	return amount;
    }

    /**
	 * 设置开票金额
	 * 
	 * @param amount 开票金额
	 * @return 当前对象
	 */
    public Invoice amount(BigDecimal amount) {
    	this.amount = amount;
    	return this;
    }

	@Override
	public InvoiceStatus getStatus() {
    	return status;
    }

    /**
	 * 设置[枚举]状态：0-未发送-UNSEND、1-未结算-UNSETTING、2-已结算-SETTED
	 * 
	 * @param status [枚举]状态：0-未发送-UNSEND、1-未结算-UNSETTING、2-已结算-SETTED
	 * @return 当前对象
	 */
    public Invoice status(InvoiceStatus status) {
    	this.status = status;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
    public Invoice createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public LocalDateTime getInvoiceTime() {
    	return invoiceTime;
    }

    /**
	 * 设置开票时间
	 * 
	 * @param invoiceTime 开票时间
	 * @return 当前对象
	 */
    public Invoice invoiceTime(LocalDateTime invoiceTime) {
    	this.invoiceTime = invoiceTime;
    	return this;
    }

	@Override
	public String getInvoiceNo() {
    	return invoiceNo;
    }

    /**
	 * 设置发票号
	 * 
	 * @param invoiceNo 发票号
	 * @return 当前对象
	 */
    public Invoice invoiceNo(String invoiceNo) {
    	this.invoiceNo = invoiceNo;
    	return this;
    }

	@Override
	public String getInvoiceTitle() {
    	return invoiceTitle;
    }

    /**
	 * 设置发票抬头
	 * 
	 * @param invoiceTitle 发票抬头
	 * @return 当前对象
	 */
    public Invoice invoiceTitle(String invoiceTitle) {
    	this.invoiceTitle = invoiceTitle;
    	return this;
    }

	@Override
	public String getSettlementMonth() {
    	return settlementMonth;
    }

    /**
	 * 设置结算月 yyyy-MM格式
	 * 
	 * @param settlementMonth 结算月 yyyy-MM格式
	 * @return 当前对象
	 */
    public Invoice settlementMonth(String settlementMonth) {
    	this.settlementMonth = settlementMonth;
    	return this;
    }

	@Override
	public String getSettleBy() {
    	return settleBy;
    }

    /**
	 * 设置结算人
	 * 
	 * @param settleBy 结算人
	 * @return 当前对象
	 */
    public Invoice settleBy(String settleBy) {
    	this.settleBy = settleBy;
    	return this;
    }

	@Override
	public LocalDateTime getSettleTime() {
    	return settleTime;
    }

    /**
	 * 设置结算时间
	 * 
	 * @param settleTime 结算时间
	 * @return 当前对象
	 */
    public Invoice settleTime(LocalDateTime settleTime) {
    	this.settleTime = settleTime;
    	return this;
    }
}
